package com.fare.util;

import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Date;
import java.util.Locale;
import java.util.Properties;
import java.util.ResourceBundle;

import org.apache.openjpa.kernel.Bootstrap;
import org.apache.struts2.ServletActionContext;

import com.fare.taluo.conf.PropertiesConfigLocalLoader;
import com.fare.taluo.util.I18nUtil;

public class TestI18N {
	public static void main(String[] args) {  
	/*//设置本地区语言（默认）  
        Locale locale = Locale.getDefault();  
        //可以使用Local的常量设置具体的语言环境  
        //Locale locale = Locale.US;  
        
        //根据地区不同加载不同的资源文件  
        ResourceBundle rb = ResourceBundle.getBundle("i18n.footer.footer", locale);
       // r
        //根据key获得value值  
        System.out.println(rb.getString("icp"));
	*/
		/*Properties prop = new Properties();
		try {
			
			prop.load(PropertiesConfigLocalLoader.class.getClassLoader().getResourceAsStream("i18n/footer/footer_zh_CN.properties"));
			System.out.println(prop.size());
			System.out.println(prop.getProperty("microblog"));
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
		
		
		/*File f = new File(TestI18N.class.getClassLoader()
				.getResource("report.properties").getPath());
		System.out.println(TestI18N.class.getClassLoader()
				.getResource("report.properties").getPath());*/
		I18nUtil.getProperties(Locale.getDefault());
		
		
		
    }  
}
